home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
comm
/
term
/
vltj5867.lha
/
VLT
/
rexx
/
SendASCII.vlt
< prev
next >
Wrap
Text File
|
1994-03-27
|
1KB
|
70 lines
/** SendASCII.vlt
*
* VLT ASCII send test using xprascii.library. Note that these days it
* is easier to use the Paste facility.
*
**/
/*
* Add libraries if necessary
*/
if show("l", "rexxarplib.library") = 0 then do
check = addlib('rexxsupport.library', 0, -30, 0)
check = addlib('rexxarplib.library', 0, -30, 0)
end
/*
* The following sequence determines both VLT's screen and port name
*/
vltport = address()
cols = ScreenCols(vltport)
if cols == -1 then vltscreen = ""
else vltscreen = vltport
/*
* Get last file sent
*/
filename = getenv(vltasciifilnam)
dirname = ""
/*
* Break up into file and dir
*/
nf = lastpos("/", filename)
if nf = 0 then do
nf = lastpos(":", filename)
if nf ~= 0 then do
dirname = substr(filename, 1, nf)
filename = substr(filename, nf + 1)
end
end
else do
dirname = substr(filename, 1, nf - 1)
filename = substr(filename, nf + 1)
end
/*
* Ask for file
*/
filename = GetFile(50, 50, dirname, filename, "Enter File Name", vltscreen)
if filename = "" then exit
/*
* Save filename to env var.
*/
call setenv(vltasciifilnam, filename)
/*
* Find out the current settings
*/
'extract transferprotocol'
'extract currentxpr'
/*
* Select current transfer protocol
*/
'xpr select xprascii.library'
'transfer protocol external'
'xpr init 50'
'file send 'filename
/*
* Set protocol back to previous
*/
'xpr select 'VLT.currentxpr
'transfer protocol 'VLT.transferprotocol
exit